﻿using System.Runtime.Serialization;

namespace DAL.DataProcess
{
    [Serializable]
    internal class CustomException : Exception
    {
        private string message;
        private Exception ex;
        private smErrorCode ec;
        private string v;
        private smErrorCode sm_ec_OutOfSpace;

        public smErrorCode ErrorCode { get; }

        public CustomException()
        {
        }

        public CustomException(string? message) : base(message)
        {
        }

        public CustomException(string? message, Exception? innerException) : base(message, innerException)
        {
        }

        public CustomException(string? message, Exception? innerException, smErrorCode sm_ec_OutOfSpace) : this(message, innerException)
        {
            this.sm_ec_OutOfSpace = sm_ec_OutOfSpace;
        }

        public CustomException(string message, Exception ex, smErrorCode ec, string v)
        {
            this.message = message;
            this.ex = ex;
            this.ec = ec;
            this.v = v;
        }

        protected CustomException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
    }
}